<?php

namespace app\model;

use think\Model;

class Uploadfile extends Model {
	protected $autoWriteTimestamp = true;
	protected $table = 'tb_uploadfile';
	protected $pk = 'id';
	protected $type = [ 
			'create_time' => 'timestamp',
			'update_time' => 'timestamp',
			'delete_time' => 'timestamp' 
	];
	protected $field = array (
			'id',
			'name',
			'size',
			'type',
			'ext',
			'path',
			'md5',
			'url' 
	);
	public static function getByMd5($md5) {
		return self::get ( [ 
				'md5' => $md5 
		] );
	}
}
